home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.552 < prev    next >
Text File  |  1992-02-06  |  2KB  |  18 lines

  1. {\rtf0\ansi{\fonttbl\f3\fnil Times-Roman;\f0\fswiss Helvetica;}
  2. \paperw11760
  3. \paperh7200
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\b0\i0\ul0\fs28 page scrolling incorrect setPageScroll setLineScroll\
  7. \
  8. Q:  I have a matrix of cells, each 10 pixels high.  The matrix lives within a ScrollView, and ten cells are visible at any time.  I set my lineScrolling to 10.0, and my pageScrolling to 100.0 (10.0 pixels * 10 cells);  line scrolling works fine, but page scrolling (alt-clicking on a scroll arrow) doesn't do what I expect.  Instead of scrolling the matrix up or down by ten cells, it only scrolls it by a few pixels (in fact, less than the lineScroll amount).  What gives?\
  9. \
  10. A:  The pageScroll value, to quote the documentation, is the “amount in common before and after the page scroll.”  For example, if I set the pageScroll value to 40.0 in the above example, a page scroll will scroll away six of the ten cells currently visible.  The 40.0 tells the ScrollView that you want 40.0 pixels of the previously visible contents to remain visible after the page scroll, which translates to 4 cells.  With the pageScrolling set to 100.0 in the above example, the ScrollView thinks you want 100.0 pixels of the previously visible contents to appear after page scrolling.  Since that's almost all the visible pixels, the matrix scrolls very little.  Setting the pageScroll value to 0.0 will cause all ten cells to scroll out of view on a page scroll.\
  11. \
  12. QA552    \
  13. \
  14. Valid for 1.0\
  15. Valid for 2.0        \
  16. \
  17.  
  18.